package org.kolonitsky.translator;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

/**
 * @author Alex.Kolonitsky
 */

public abstract class BaseTranslator implements Translator {

    protected static final Log LOG = LogFactory.getLog(Translator.class);

    protected final Lang from;
    protected final Lang to;

    public BaseTranslator(Lang from, Lang to) {
        this.from = from;
        this.to = to;
    }

    public BaseTranslator(Lang to) {
        this(Lang.DEFAULT, to);
    }

    public BaseTranslator() {
        this(null, null);
    }

    public Lang from() {
        return from;
    }

    public Lang to() {
        return to;
    }

    abstract public String translate(String text);
}
